package com.wpf.system.mapper;

import com.wpf.system.entity.EquipmentBuy;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.wpf.system.entity.vo.EquipmentBagVO;
import com.wpf.system.entity.vo.EquipmentBuyVO;
import com.wpf.system.entity.vo.EquipmentChartVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author ferna
* @description 针对表【equipment_buy(器材购买记录表)】的数据库操作Mapper
* @createDate 2023-02-14 21:21:48
* @Entity com.wpf.system.entity.EquipmentBuy
*/
public interface EquipmentBuyMapper extends BaseMapper<EquipmentBuy> {

    /**
     * 回显购买确认
     * @param ids 购买记录id集
     * @return 购买记录的详细信息
     */
    List<EquipmentBagVO> getBackEquipmentInfo(@Param("ids") List<Long> ids);

    /**
     * 批量物理删除购买记录
     * @param ids 删除的购买记录id集
     * @return 是否删除成功
     */
    int deleteEquipmentBuyByIds(@Param("ids") List<Long> ids);

    /**
     * 根据条件查看购买情况
     */
    List<EquipmentBuyVO> getAllEquipmentBuy(
            @Param("no") String no,@Param("uid") Long uid,@Param("name") String name,@Param("nid") String nid,
            @Param("username") String username,@Param("phone") String phone,
            @Param("startTime") String startTime,@Param("endTime") String endTime,
            @Param("page") Integer page,@Param("pageSize") Integer pageSize
    );

    /**
     * 获取出售图表情况
     */
    List<EquipmentChartVO> getEquipmentBuyChartData(@Param("startDate") String startDate, @Param("endDate") String endDate);
}




